﻿<%@ Page Language="C#" MasterPageFile="~/Layout/Site.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="WorkflowManager :: Login" %>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainPlaceHolder" Runat="Server">
    <wfm:WorkflowManagerProxy ID="WorkflowManagerProxy" runat="server">
        <Triggers>
            <wfm:EventWorkflowTrigger ControlId="LoginButton" EventName="Click" WorkflowType="SampleWebsite.Workflow.LoginWorkflow, SampleWebsite.Workflow">
                <Parameters>
                    <asp:ControlParameter Name="Username" ControlId="UsernameEdit" PropertyName="Text" Type="String" Size="20" />
                    <asp:ControlParameter Name="Password" ControlId="PasswordEdit" PropertyName="Text" Type="String" Size="20" />
                    <asp:QueryStringParameter Name="ReturnUrl" QueryStringField="ReturnUrl" DefaultValue="~/" />
                </Parameters> 
            </wfm:EventWorkflowTrigger>
        </Triggers>
    </wfm:WorkflowManagerProxy>
    
    <table>
        <tr>
            <td><asp:Label ID="UsernameLabel" runat="server" Text="Username" AssociatedControlID="UsernameEdit" /></td>
            <td><asp:TextBox ID="UsernameEdit" runat="server" TextMode="SingleLine" MaxLength="20" /></td>
            <td><asp:RequiredFieldValidator ID="UsernameValidator" runat="server" SetFocusOnError="true" ControlToValidate="UsernameEdit" EnableClientScript="true" ErrorMessage="Username required." Text="*" /></td>
        </tr>
        <tr>
            <td><asp:Label ID="PasswordLabel" runat="server" Text="Password" AssociatedControlID="PasswordEdit" /></td>
            <td><asp:TextBox ID="PasswordEdit" runat="server" TextMode="Password" MaxLength="20" /></td>
            <td><asp:RequiredFieldValidator ID="PasswordValidator" runat="server" SetFocusOnError="true" ControlToValidate="PasswordEdit" EnableClientScript="true" ErrorMessage="Password required." Text="*" /></td>
        </tr>
        <tr>
            <td colspan="2"><asp:Button ID="LoginButton" runat="server" Text="Login" /></td>
            <td>&nbsp;</td>
        </tr>
    </table>
    <p>
        The test username is <b>TestUser</b> the password is <b>TestP@ssword</b>.
    </p>
</asp:Content>

